#!/bin/bash
loadHelmImages(){

cd ../soft

tar -zxvf ./helm-v2.13.1-linux-amd64.tar.gz

cp -a linux-amd64/helm /usr/local/bin/
chmod a+x /usr/local/bin/helm

tar -zxvf helm-tiller.tar.gz

docker load -i helm-tiller.tar
}

startHelm(){
  kubectl create -f ../script/helm/helm-rbac.yaml
  helm init --service-account tiller --skip-refresh
}

main(){
  loadHelmImages
  startHelm
}
main